package cn.org.donald.file;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.stream.Stream;

/**
 * @author Donald
 * @since 2023-11-13 15:52:48
 **/
public class ListDir {
    public static void main(String[] args) {
        try (Stream<Path> list = Files.list(Paths.get("C:\\Windows\\Fonts"))) {
            list.forEach(System.out::println);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
